import request from '@/router/axios'

export function fetchPvmMedicalReportList(query) {
  return request({
    url: '/pvm/pvmmedicalreport/page',
    method: 'get',
    params: query
  })
}

export function addPvmMedicalReportObj(obj) {
  return request({
    url: '/pvm/pvmmedicalreport',
    method: 'post',
    data: obj
  })
}

export function getPvmMedicalReportObj(id) {
  return request({
    url: '/pvm/pvmmedicalreport/' + id,
    method: 'get'
  })
}

export function getPvmMedicalReportById(id) {
  return request({
    url: '/pvm/pvmmedicalreport/reportId' + id,
    method: 'get'
  })
}

// 导出excel
export function getOptometryListExport(obj) {
  return request({
    url: '/pvm/pvmmedicalreport/excel',
    method: 'post',
    data: obj,
    responseType: 'blob'
  })
}

export function delPvmMedicalReportObj(id) {
  return request({
    url: '/pvm/pvmmedicalreport/' + id,
    method: 'delete'
  })
}

export function putPvmMedicalReportObj(obj) {
  return request({
    url: '/pvm/pvmmedicalreport',
    method: 'put',
    data: obj
  })
}

export function getChildrenEvaluate(obj) {
  return request({
    url: '/pvm/pvmmedicalreport/getChildrenEvaluate',
    method: 'post',
    data: obj
  })
}
